package br.com.tecnove.random.android;

import android.app.Activity;
import android.content.Intent;
import android.view.MenuItem;

public class ContextMenu {

	public static boolean itemClicked(MenuItem item, Activity act){
//		AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();
		switch (item.getItemId()) {
		case R.id.menuAbout:			
			Intent i = new Intent(act, AboutActivity.class);
			act.startActivity(i);
			return true;
		case R.id.menuQuit:
			act.finishFromChild(act);
			//TODO: descobrir como fechar app
			return true;
		default:
//			return super.onContextItemSelected(item);
			return false;
		}
	}
	
}
